<?php
/**
 * Created by PhpStorm.
 * User: chenxiaogang
 * Date: 2017/11/17
 * Time: 上午11:51
 */

namespace User\Model;


use Common\Model\CommonModel;

class ReportCurrentOrders extends CommonModel
{
    protected $connection = 'DB_CONFIG2';
    protected $trueTableName = 'report_current_orders';

    public function getStatusText($key,$returnAll = false)
    {
        $status = [
            0 => '待审核',
            1 => '借款中',
            2 => '已还款',
            3 => '逾期',
            4 => '已到期',
            5 => '审核中',
            6 => '审核不通过',
            7 => '驳回',
            8 => '放款成功',
            9 => '放款不成功',
            10 => '待放款',
        ];
        if($returnAll){
            return $status;
        }
        if(!array_key_exists( $key, $status )) {
            return '';
        }
        return $status[(int)$key];
    }


}